<template>
  <div class="party_mass_list">
    <router-link
      v-for="(item,index) in listInfo"
      :key="index"
      :to="{name:'jap_party_mass_details',query:{id:item.id}}"
      class="party_mass_item clearfloat"
    >
 <el-image class="img" :src="item.image_input" fit="cover" lazy></el-image>
      <div class="party_mass_abstract">
        <h3>{{item.title}}</h3>
        <p>{{item.synopsis}}</p>
        <div class="party_mass_time">
          <img src="@/assets/images/news_time.png" alt />
          <span>{{item.date_time}}</span>
        </div>
        <router-link
          :to="{name:'jap_party_mass_details',query:{id:item.id}}"
          class="details_botton"
        >詳しい</router-link>
      </div>
    </router-link>
    <el-pagination
      :page-size="10"
      :total="count"
      background
      layout="prev, pager, next"
      @current-change="pageSize"
      :current-page.sync="currentPage"
    ></el-pagination>
  </div>
</template>
<script>
import { business_list, business_visit } from "@/api/party_mass.js";
export default {
     name:'party_mass_list',
  data() {
    return {
      count: 50,
      listInfo: [], //列表数据
      currentPage: 1 //当前页数
    };
  },
  mounted() {
    this.getBusiness_list(1, 10);
  },
  methods: {
    pageSize(val) {
      this.currentPage = val;
      this.getBusiness_list(val, 10);
    },
    getBusiness_list(page, limit) {
      business_list({ page, limit }).then(res => {
        this.count = res.data.count;
        this.listInfo = res.data.data;
      });
    }
  }
};
</script>
<style scoped src="./sass/party_mass.css"></style>